/*
 * @Author: cgl
 * @Date: 2023-04-20 09:49:21
 * @LastEditors: cgl
 * @LastEditTime: 2023-07-10 08:52:03
 * @FilePath: \public-health-emergencies-fed:\radiation-hygiene-fe\src\api\person\entrustAgreement.js
 * @Description:
 *
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved.
 */
import request from '@/utils/request'

// 查询合同分页列表
export function entrustAgreementList(data) {
  return request({
    url: '/basic/entrust/agreement/list',
    method: 'post',
    data,
  })
}
// 查询合同列表
export function entrustAgreementListing(params) {
  return request({
    url: '/basic/entrust/agreement/listing',
    method: 'get',
    params,
  })
}
// 导出合同列表
export function entrustAgreementExport(data) {
  return request({
    url: `/basic/entrust/agreement/export`,
    method: "post",
    data,
  });
}
// 获取合同详细信息
export function entrustAgreementDetail(agreementId) {
  return request({
    url: '/basic/entrust/agreement/getInfo/' + agreementId,
    method: 'get'
  })
}
// 新增合同
export function entrustAgreementAdd(data) {
  return request({
    url: `/basic/entrust/agreement/add`,
    method: "post",
    data,
    headers: {
			isLoading: true,
		}
  });
}
// 修改合同
export function entrustAgreementEdit(data) {
  return request({
    url: '/basic/entrust/agreement/edit',
    method: 'post',
    data,
    headers: {
			isLoading: true,
		}
  })
}
// 合同续签
export function entrustAgreementRenew(data) {
  return request({
    url: '/basic/entrust/agreement/renew',
    method: 'post',
    data,
    headers: {
      isLoading: true,
    }
  })
}
// 删除合同
export function entrustAgreementDelete(agreementIds) {
  return request({
    url: '/basic/entrust/agreement/remove/' + agreementIds,
    method: 'get',
    headers: {
			isLoading: true,
		}
  })
}
// 获取合同下拉框
export function tasksContractBindList(params) {
  return request({
    url: '/task/contract/tasksContractBindList',
    method: 'get',
		params,
  })
}
// 合同列表-检测项目下钻列表
export function queryDetectionProjectList(params) {
  return request({
    url: '/task/detectionTogether/queryDetectionProjectList',
    method: 'get',
		params,
  })
}
// 检测总任务里的合同列表下拉
export function getAgreementListWithTaskTogether(params) {
  return request({
    url: '/basic/entrust/agreement/getAgreementListWithTaskTogether',
    method: 'get',
		params,
  })
}
// 外照射任务里的合同列表下拉
export function getAgreementListWithTaskDosimeter(params) {
  return request({
    url: '/basic/entrust/agreement/getAgreementListWithTaskDosimeter',
    method: 'get',
		params,
  })
}

// 生成合同编号
export function getGenAgreementNumber(params) {
  return request({
    url: '/basic/entrust/agreement/genAgreementNumber',
    method: 'get',
		params,
  })
}
